# SistCollab - Iteration 1. raul
class Opinion < ActiveRecord::Base
# Table Opinion
# t.integer :overal_rating
# t.integer :price_rating
 belongs_to :person
 belongs_to :business, :dependent => :destroy 
 
 validates_uniqueness_of :person_id, :scope => :business_id
 after_create :log_activity
 
 
   private

    def log_activity
      add_activities(:item => self, :person => self.person)
    end
end
